package com.czr.config.userlocal;

import com.czr.entity.User;

/**
 * Description:
 * Author: czr czr
 * Version: 1.0
 * Create Date Time: 2021/12/7 10:15.
 * Update Date Time:
 *
 * @see
 */
public class UserThreadLcal {
    private static ThreadLocal<User> userLocal = new ThreadLocal<>();

    public static void put(User user) {
        userLocal.set(user);
    }

    public static User get() {
        return userLocal.get();
    }

    public static void clear() {
        userLocal.remove();
    }

}
